<%@ page import="raojt.day0109.tour.entity.TourRoute" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="raojt.day0109.tour.entity.ScenicSpot" %>
<%@ page import="java.util.List" %>
<%@ page import="raojt.day0109.tour.dao.TourDao" %>
<%@ page import="raojt.day0109.tour.dao.impl.TourDaoImpl" %><%--
  Created by IntelliJ IDEA.
  User: 22770
  Date: 2023/1/9
  Time: 22:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>旅游路线添加</title>
    <%
        request.setCharacterEncoding("UTF-8");
        TourDao tourDao = new TourDaoImpl();
        String name = request.getParameter("name");
        String type = request.getParameter("tourType");
        String price = request.getParameter("price");
        String userName = request.getParameter("userName");
        String userPhone =request.getParameter("userPhone");
        TourRoute tourRoute = new TourRoute();
        tourRoute.setName(name);
        tourRoute.setType(type);
        tourRoute.setPrice(price);
        tourRoute.setPhone(userPhone);
        tourRoute.setUser(userName);
        int addRes = tourDao.addTourRoute(tourRoute);
        if (addRes > 0){
            out.println("添加成功");
        }else{
            out.println("添加失败");
        }
    %>
</head>
<a href="index.jsp">点击返回主页面</a>
<body>

</body>
</html>
